using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;

public class PublicMonoManager:SingletonPattern<PublicMonoManager>
{
    public PublicMonoController controler;
    public PublicMonoManager()
    {
        GameObject controlerObj = new GameObject("PublicMonoControler");
        controler = controlerObj.AddComponent<PublicMonoController>();
    }

    public void AddUpdateListener(UnityAction action)
    {
        controler.AddUpdateListener(action);
    }
    public void RemoveUpdateListener(UnityAction action)
    {
        controler.RemoveUpdateListener(action);
    }

    public Coroutine StartCoroutine(string methodName)
    {
        return controler.StartCoroutine(methodName);
    }
    public Coroutine StartCoroutine(IEnumerator routine)
    {
        return controler.StartCoroutine(routine);
    }

    public void StopAllCoroutines()
    {
        controler.StopAllCoroutines();
    }
    public void StopCoroutine(IEnumerator routine)
    {
        controler.StopCoroutine(routine);
    }
    public void StopCoroutine(Coroutine routine)
    {
        controler.StopCoroutine(routine);
    }
    public void StopCoroutine(string methodName)
    {
        controler.StopCoroutine(methodName);
    }
}
